package com.fortune.dao;


import com.fortune.dto.in.dStoreSurplus.DStoreSurplusAddDto;
import com.fortune.dto.in.dStoreSurplus.DStoreSurplusEditDto;
import com.fortune.dto.in.dStoreSurplus.DStoreSurplusInfoDto;
import com.fortune.dto.in.dStoreSurplus.DStoreSurplusListDto;
import com.fortune.vo.dStoreSurplus.DStoreSurplusInfo;
import com.fortune.vo.dStoreSurplus.DStoreSurplusInfoDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DStoreSurplusDao {

    /**
     * 新增报盈单base
     * @param companyId
     * @param uuid
     * @param uid
     * @param addDto
     * @return
     */
    int addSurplusBase(@Param("companyId") String companyId,@Param("dealerId") String dealerId, @Param("uuid") String uuid, @Param("uid") String uid, @Param("addDto") DStoreSurplusAddDto addDto);


    /**
     * 新增报盈单商品
     * @param companyId
     * @param uuid
     * @param infoDto
     * @return
     */
    int addSurplusDetail(@Param("companyId") String companyId,@Param("dealerId") String dealerId, @Param("uuid") String uuid, @Param("infoDto") DStoreSurplusInfoDto infoDto);


    /**
     * 查询报盈列表
     * @param companyId
     * @return
     */
    List<DStoreSurplusInfo> findDealerSurplusList(@Param("companyId") String companyId, @Param("dealerId") String dealerId, @Param("dStoreSurplusListDto") DStoreSurplusListDto dStoreSurplusListDto);


    /**
     * 查询报盈列表数量
     * @param companyId
     * @param dStoreSurplusListDto
     * @return
     */
    int findDealerSurplusListCount(@Param("companyId") String companyId,@Param("dealerId") String dealerId, @Param("dStoreSurplusListDto") DStoreSurplusListDto dStoreSurplusListDto);


    /**
     * 查看报盈商品详情
     * @param companyId
     * @param deficitId
     * @return
     */
    DStoreSurplusInfoDetail findDealerIdSurplusInfo(@Param("companyId")String companyId,@Param("dealerId") String dealerId, @Param("deficitId") String deficitId);


    /**
     * 确认入库
     * @param companyId
     * @param dealerId
     * @param uuid
     * @return
     */
    int editDStoreSurplusConfirm(@Param("companyId") String companyId,@Param("dealerId")String dealerId,@Param("operatorId") String operatorId, @Param("uuid") String uuid);

    /**
     * 删除
     * @param companyId
     * @param dealerId
     * @param uuid
     * @return
     */
    int deleteDStoreSurplus(@Param("companyId") String companyId,@Param("dealerId")String dealerId, @Param("uuid") String uuid);


    /**
     * 编辑报亏单base
     * @param companyId
     * @param addDto
     * @return
     */
    int editSurplusBase(@Param("companyId") String companyId,@Param("dealerId") String dealerId, @Param("editDto") DStoreSurplusEditDto editDto);

    /**
     * 删除商品详情
     * @param companyId
     * @param dealerId
     * @param uuid
     * @return
     */
    int deleteInfo(@Param("companyId") String companyId,@Param("dealerId")String dealerId, @Param("uuid") String uuid);
}
